<template>
  <div >
    <div>
      <van-nav-bar
          title="订单"
          left-text="返回"
          left-arrow
          @click-left="tocart1()"
      />
      <div v-for="(c,index) in shop" :key="c">
        <van-checkbox-group v-model="checked1" ref="checkboxGroup" >
          <van-swipe-cell >
            <van-checkbox :name="c.sid">
              <van-card
                  :num="c.nub"
                  :price=" c.discount * c.nub"
                  :title=" c.name  "
                  class="goods-card"
                  :thumb="c.img"
              />
            </van-checkbox>
            <template #right>
              <van-button square text="删除" type="danger" class="delete-button" @click="del(c.sid,this)"  />
            </template>

          </van-swipe-cell>
        </van-checkbox-group>
      </div>
    </div>
</div>
</template>

<script>
export default {
  name: "OrderView",
  data(){
    return{
      shop :[{
        sid:"",
        mid:"",
        img: "",
        name: "",
        discount:"" ,
        nub:""
      }],
      checked1:[1,2]
    }
  },
  methods:{
    tocart1(){
      this.$router.push("/cart")
    }
  }
}
</script>

<style scoped>

</style>